package com.torry.edss.integration.feign.eastmoney.response;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * @author torry.wang
 */
@Data
@ApiModel("股票主题板块响应数据")
public class EMStockCategoryResponse {
    
    @JsonProperty("version")
    @ApiModelProperty(value = "数据版本标识", example = "ff1068b67976f727309a5e3042da17ad")
    private String version;
    
    @ApiModelProperty("响应结果主体")
    private Result result;
    
    @JsonProperty("success")
    @ApiModelProperty(value = "请求是否成功", example = "true")
    private boolean success;
    
    @JsonProperty("message")
    @ApiModelProperty(value = "返回消息", example = "ok")
    private String message;
    
    @JsonProperty("code")
    @ApiModelProperty(value = "状态码", example = "0")
    private int code;

    @Data
    @ApiModel("响应结果主体")
    public static class Result {
        
        @JsonProperty("pages")
        @ApiModelProperty(value = "总页数", example = "1")
        private int pages;
        
        @ApiModelProperty("主题板块数据列表")
        private List<ThemeData> data;
        
        @JsonProperty("count")
        @ApiModelProperty(value = "数据总数", example = "17")
        private int count;
    }

    @Data
    @ApiModel("股票主题板块数据")
    public static class ThemeData {
        
        @JsonProperty("SECUCODE")
        @ApiModelProperty(value = "证券统一代码", example = "000001.SZ")
        private String secuCode;
        
        @JsonProperty("SECURITY_CODE")
        @ApiModelProperty(value = "证券代码", example = "000001")
        private String code;
        
        @JsonProperty("SECURITY_NAME_ABBR")
        @ApiModelProperty(value = "证券简称", example = "平安银行")
        private String name;
        
        @JsonProperty("BOARD_CODE")
        @ApiModelProperty(value = "板块代码", example = "475")
        private String categoryCode;
        
        @JsonProperty("BOARD_NAME")
        @ApiModelProperty(value = "板块名称", example = "银行")
        private String categoryName;
        
        @JsonProperty("IS_PRECISE")
        @ApiModelProperty(value = "是否精准匹配", example = "0")
        private String isPrecise;
        
        @JsonProperty("BOARD_RANK")
        @ApiModelProperty(value = "板块排名", example = "1")
        private Integer boardRank;
        
        @JsonProperty("BOARD_TYPE")
        @ApiModelProperty(value = "板块类型", example = "行业")
        private String boardType;
    }
}